//
//  LTY_SearchCollectionViewCell.m
//  MooMusic
//
//  Created by 守护神 on 15/10/26.
//  Copyright © 2015年 wjy. All rights reserved.
//

#import "LTY_SearchCollectionViewCell.h"

@implementation LTY_SearchCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        nameLable = [[UILabel alloc] initWithFrame:CGRectZero];
        nameLable.backgroundColor = [UIColor lightGrayColor];
        [self.contentView addSubview:nameLable];
    }
    return self;
}

// item布局
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    nameLable.frame = CGRectMake(0, 5, SCREENWIDTH / 5.5, 40);
    nameLable.layer.cornerRadius = 20;
    nameLable.clipsToBounds = YES;
    nameLable.textAlignment = NSTextAlignmentCenter;
    
}

// 重写set方法
- (void)setModel:(LTY_SearchModel *)model
{
    _model = model;
    nameLable.text = model.val;
}


@end
